using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DTO;
using DAL;
using BUS;
using Utility;

public partial class User_User : System.Web.UI.MasterPage
{
    
    protected void Page_Load(object sender, EventArgs e)
    {

        //LoaiHangColection loaiHangCollection = LOAIHANG_BUS.GetAll();

        //Repeater1.DataSource = loaiHangCollection;
        //Repeater1.DataBind();
        if (!IsPostBack)
        {
              if(Session["makhachhang"]!=null)
        {
            HyperLink1.Visible = true;
        } 
        LoadDropDownList();
        //Loaddata();
        }

    }

    //private void Loaddata()
    //{
    //    LoaiHangColection loaihangclt = LOAIHANG_BUS.GetAll();
    //    Repeater1.DataSource = loaihangclt;

    //    Repeater1.DataBind();
    //}

    private void LoadDropDownList()
    {
        tbKhuVucCollection khuvuc = KHUVUC_BUS.GetAll();
        DropDownList1.DataTextField = tbKhuVucColumns.TenKhuVuc.ToString();
        DropDownList1.DataValueField = tbKhuVucColumns.MaKhuVuc.ToString();
        DropDownList1.DataSource = khuvuc;
        DropDownList1.DataBind();
       
    }

    //protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    //{
    //    //if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
    //    //{
    //    //    LoaiHang_DTO loaihang = (LoaiHang_DTO)e.Item.DataItem;
    //    //    HyperLink hplloaihang = (HyperLink)e.Item.FindControl("hyl_maloai");
    //    //    hplloaihang.Text = "fgf";
    //    //    hplloaihang.NavigateUrl = "#";

            
    //    //}
    //}
}
